﻿using CommonType;
using S_Incident.Domains.WorkflowEngine;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace S_Incident.Domains.EventHandling
{
    /// <summary>
    /// 事件处置表
    /// </summary>
    [SugarTable("EventDisposition")]
    public class EventDisposition: BaceEntity
    {
        /// <summary>
        /// 事件id
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        /// <summary>
        /// 事件来源
        /// </summary>
        [SugarColumn(ColumnDescription = "事件来源", Length = 200, IsNullable = true)]
        public string? EventSource { get; set; }
        /// <summary>
        /// 上报人
        /// </summary>
        [SugarColumn(ColumnDescription = "上报人", Length = 200, IsNullable = true)]
        public string? Informant { get; set; }
        /// <summary>
        /// 联系电话
        /// </summary>
        [SugarColumn(ColumnDescription = "联系电话", Length = 200, IsNullable = true)]
        public string? Phone { get; set; }
        /// <summary>
        /// 上报时间
        /// </summary>
      	[SugarColumn(IsNullable = true)]
        public DateTime? ReportingTime { get; set; } = DateTime.Now;
        /// <summary>
        /// 事件描述
        /// </summary>
        [SugarColumn(ColumnDescription = "事件描述", Length = 200, IsNullable = true)]
        public string? IncidentDescription { get; set; }
        /// <summary>
        /// 事件级别
        /// </summary>
        public int EventLevel { get; set; }
        /// <summary>
        /// 位置描述
        /// </summary>
        [SugarColumn(ColumnDescription = "位置描述", Length = 200, IsNullable = true)]
        public string? LocationDescription { get; set; }
        /// <summary>
        /// 是否在图内
        /// </summary>
        public int Map { get; set; }
        /// <summary>
        /// 事件类型
        /// </summary>
        [SugarColumn(ColumnDescription = "事件类型", Length = 200, IsNullable = true)]
        public string? EventType { get; set; }
        /// <summary>
        /// 事件座标
        /// </summary>
        [SugarColumn(ColumnDescription = "事件座标", Length = 500, IsNullable = true)]
        public string? EventCoordinate { get; set; }
        /// <summary>
        /// 行业类型
        /// </summary>
        [SugarColumn(ColumnDataType = "INT", IsNullable = false)]
        public Industry IndustryType { get; set; }
        /// <summary>
        /// 所属网格
        /// </summary>
        [SugarColumn(ColumnDescription = "所属网格", Length = 200, IsNullable = true)]
        public string? OwningGrid { get; set; }
        /// <summary>
        /// 选择大类
        /// </summary>
        [SugarColumn(ColumnDescription = "选择大类", Length = 250, IsNullable = true)]
        public string? SelectiveCategory { get; set; }
      
        /// <summary>
        /// 选择小类
        /// </summary>
        public int SelectiveSubclass { get; set; }
        /// <summary>
        /// 上传附件
        /// </summary>
        [SugarColumn(ColumnDescription = "上传附件", Length = 200, IsNullable = true)]
        public string? UploadAttachments { get; set; }
        /// <summary>
        /// 预警状态
        /// </summary>
        public int AlertStatus { get; set; }
        /// <summary>
        /// 当前节点
        /// </summary>
        public int NodeId { get; set; }
        /// <summary>
        /// 流转意见
        /// </summary>
        public string? CirculatingOpinions { get; set; }
        /// <summary>
        /// 关于事件标识符
        /// </summary>
        [SugarColumn(ColumnDataType = "INT", IsNullable = false)]
        public EventType EventCategory { get; set; }
        /// <summary>
        /// 结案时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime ClosedTime { get; set; }
        /// <summary>
        /// 评价状态
        /// </summary>
        public int EvaluationStatus { get; set; }

        /// <summary>
        /// 关闭原因
        /// </summary>
        [SugarColumn(ColumnDescription = "关闭原因", Length = 200, IsNullable = true)]
        public string? ShutdownReason { get; set; }
        /// <summary>
        /// 关闭时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? ClosingTime { get; set; }
        /// <summary>
        /// 申请时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime ApplicationTime { get; set; }
        /// <summary>
        /// 申请部门
        /// </summary>
        [SugarColumn(ColumnDescription = "申请部门", Length = 200, IsNullable = true)]
        public string? ApplicationDepartment { get; set; }
        /// <summary>
        /// 申请理由
        /// </summary>
        [SugarColumn(ColumnDescription = "申请理由", Length = 200, IsNullable = true)]
        public string? ApplicationReason { get; set; }
        /// <summary>
        /// 延期时长
        /// </summary>
        public int DelayTime { get; set; }
        /// <summary>
        /// 审批结果
        /// </summary>
        [SugarColumn(ColumnDescription = "审批结果", Length = 200, IsNullable = true)]
        public string? ApprovalResult { get; set; }
        /// <summary>
        /// 审批意见
        /// </summary>
        [SugarColumn(ColumnDescription = "审批意见", Length = 200, IsNullable = true)]
        public string? ApprovalOpinions { get; set; }
        /// <summary>
        /// 挂起理由
        /// </summary>
        [SugarColumn(ColumnDescription = "挂起理由", Length = 200, IsNullable = true)]
        public string? SuspendReason { get; set; }
        /// <summary>
        /// 挂起次数
        /// </summary>
        public int SuspendNumber { get; set; }
        /// <summary>
        /// 审批状态
        /// </summary>
        public int ApprovalStatus { get; set; }
        /// <summary>
        /// 督办次数
        /// </summary>
        public int SupervisingNumber { get; set; }
        /// <summary>
        /// 督办单位
        /// </summary>
        [SugarColumn(ColumnDescription = "督办单位", Length = 200, IsNullable = true)]
        public string? SupervisingUnit { get; set; }
        /// <summary>
        /// 督办意见
        /// </summary>
        [SugarColumn(ColumnDescription = "督办意见", Length = 200, IsNullable = true)]
        public string? SupervisingOpinion { get; set; }
        /// <summary>
        /// 督办回复
        /// </summary>
        [SugarColumn(ColumnDescription = "督办回复", Length = 200, IsNullable = true)]
        public string? SupervisingReply { get; set; }
        /// <summary>
        /// 督办催办事件类型(在办事件、超期事件)
        /// </summary>
        public int SupervisingRemindersEvent { get; set; }
        /// <summary>
        /// 催办单位
        /// </summary>
        [SugarColumn(ColumnDescription = "催办单位", Length = 200, IsNullable = true)]
        public string? ReminderUnit { get; set; }
        /// <summary>
        /// 催办意见
        /// </summary>
        [SugarColumn(ColumnDescription = "催办意见", Length = 200, IsNullable = true)]
        public string? ReminderOpinions { get; set; }
        /// <summary>
        /// 催办回复
        /// </summary>
        [SugarColumn(ColumnDescription = "催办回复", Length = 200, IsNullable = true)]
        public string? ReminderResponse { get; set; }
        /// <summary>
        /// 催办次数
        /// </summary>
        public int RemindersNumber { get; set; }
        /// <summary>
        /// 延期次数
        /// </summary>
        public int PostponeNumber { get; set; }
        /// <summary>
        /// 到达时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? ArrivalTime { get; set; }
        /// <summary>
        /// 处理截止时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? ProcessingDeadline { get; set; }
        /// <summary>
        /// 处置部门
        /// </summary>
        [SugarColumn(ColumnDescription = "处置部门", Length = 200, IsNullable = true)]
        public string? DisposalDepartment { get; set; }
        /// <summary>
        /// 案件状态
        /// </summary>
        public int CaseStatus { get; set; }
        /// <summary>
        /// 超期时间
        /// </summary>
        [SugarColumn(ColumnDescription = "超期时间", Length = 200, IsNullable = true)]
        public string? ExpirationTime { get; set; }


    }
}
